#include <iostream>
using namespace std;
#define n 10
int main() {
    int A[n]={49,38,65,97,13,76,27,48,55,4};
    int i,j,inc;
    int temp;
    for(inc=n;inc>0;inc/=2){
        for(i=inc;i<n;i++){
            temp=A[i];
            for(j=i-inc;j>=0 && temp<A[j];j-=inc){
                A[j+inc]=A[j];
            }
            A[j+inc]=temp;
        }
    }
    for(int i=0;i<n;i++){
        cout<<A[i]<<" ";
    }
    return 0;
}